If you’ve done programming on the Mac you've probably seen sketches of the Macintosh’s address space. A memory map is a grpahical representation of that address space as a grid or map in order to show the location of various system structures in RAM and where they are in relation to each other. Memory Mapper draws this map for your own computer.
How Does It Work?
Memory Mapper determines the boundaries of objects in memory by examining low-memory globals, querying the Process Manager, and checking the page state of each piece of memory (if virtual memory is on). Consequently, Memory Mapper requires System 7.1 and a 68020 Mac or later.
Item List
The right side of the window is the Item List which shows each partition’s name, type, signature, size, and amount of free space left in that partition.
The name is the application’s name or the name of the system structure. Unused areas of RAM which are larger than 3K (there’s always a few bytes between programs) are also indicated.
The type is the four-character type code: APPL for applications, appe and INIT for faceless background processes (they don’t show up in the Application menu), dfil for desk accessories, etc.
The signature is the unique four-character code which identifies the process so that it can be matched to the documents and icons which are associated with it.
The size is the total size of the partition that has been assigned to it.
The free space is what the Process Manager reports as the unused and available heap space for the process. In the case of the system heap, it is the amount reported by FreeMemSys.
Memory Map
The left side of the window is the Memory Map which shows the entire physical RAM or, if virtual memory is on, the total logical RAM of your computer. The map is drawn to scale and displays the way memory space is partitioned for use by the system and applications. The amount of a partition that is actually used is indicated by filling in the lower part of the partition like a thermometer.
Virtual Memory Indicator
If you are using virtual memory you will see another area to the right of the memory map which indicates which parts of memory are in RAM and which are paged out to disk. The black areas are what are currently stored in the backing file on the hard disk (at least in the case of Apple’s virtual memory scheme). In the screen dump above, the backing file is 32 megabytes in size, augmenting the 16 megabytes of physical memory with 16 megabytes of virtual memory.
(Sometimes you will see some of this memory in red. This is memory which is “not paged”, it is not part of the virtual paged memory space.)
Process Info Dialog
If you double-click on one the items in the Item List you will get a dialog which provides more information about that memory partition:
Process: The name of the process.
Type: Memory block type: application, desk accessory, or background process.
Address: The base address of the process or partition.
PSN: Process Serial Number (high/low).
Launched: Time and date when the process was started.
Active Time: Accumulated CPU time (hh:mm:ss)
Path: Path to process’s file.
Block Types
Memory Mapper displays five types of memory blocks:
Low Memory Globals The location for many system parameters.
System Heap The RAM which the System uses for storing it’s current resources
such as fonts, icons, and sounds.
Free Memory Free RAM still available for applications.
High Memory Used for debuggers, sound and video buffers, and the disk cache.
Processes Applications, desk accessories, and background processes.
Automatic Updates
Memory Mapper detects when you open or close applications and redraws its window automatically. You can, however, force a redraw by choosing Update from the File menu. You can also select Update Regularly from the File menu to activate a 10-second update interval. Forced updates are useful if you want to watch how virtual memory pages the application memory space to disk.
Send Quit Event
You can send an AppleEvent ‘quit’ message to a currently-running process. This allows you to quit some processes which you normally can’t quit from, such as the Finder or certain background processes.
(Some background processes will report that they didn’t handle the “quit” message even when they did. Others, such as File Sharing, won’t quit but they may stop running.)
Miscellaneous Notes
The number that the Finder reports for the size of “System Software” is not the system heap alone but a combination of the system heap, high and low memory, and the Finder’s partition.
The number that the Finder reports for the size of application partitions is different than the actual partition because the Finder subtracts out the stack space and adds temporary memory.
If you bring up the Process Info dialog for a process that is located on a floppy disk or on a System 6 volume you will get a “missing” icon because those volume types do not have a desktop database file.
When the Finder reports “Not enough memory to load application” it is often because there is not enough contiguous memory available. Memory Mapper makes it easy to see how memory space can become fragmented.
In System 7 the system heap grows dynamically. When the Finder reports “Insufficient memory for this operation” it is usually because an application partition is next to the system heap and is preventing it from growing. Quitting this application can free the system heap and let the other application work.
Versions
1.4.1 Fixes time display bug.
1.4 Takes advantage of Appearance Manager to make dialog moveable, etc.
1.3.5 Compensates for incorrect free memory sizes
1.3.4 Does better job of getting icons
1.3.3 More bug fixes
1.3.2 Bug fixes
1.3.1 Fixes problems recognizing virtual memory under System 7.5.5